package com.intellagric.controller.portal.iftmonitor;

import com.intellagric.common.pojo.LayuiDataGridResult;
import com.intellagric.common.pojo.ResponseMessage;
import com.intellagric.module.iftmonitor.EquipmentVo;
import com.intellagric.pojo.IftEquipment;
import com.intellagric.service.iftmonitor.ift_equipment.EquipmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.Date;
import java.util.UUID;

/**
 * @Author: zhy
 * @email: 1269679946@qq.com
 * @Date: 2018/10/20
 * @DESC： 设备管理
 */
@Controller
public class EquipmentController {

    @Autowired
    private EquipmentService equipmentService;

    /**
     * 查询设备信息
     * @return IftEquipment
     */
    @RequestMapping("/equipment/{id}")
    @ResponseBody
    public IftEquipment get(@PathVariable String id) {
        return equipmentService.getEquipmentById(id);
    }

    /**
     * 查询设备信息列表
     * @return LayuiDataGridResult
     */
    @RequestMapping("/equipment/list")
    @ResponseBody
    public LayuiDataGridResult getList() {
        return equipmentService.getEquipmentList();
    }

    /**
     * 多条件查询设备信息列表
     * @return LayuiDataGridResult
     */
    @RequestMapping("/equipment/query")
    @ResponseBody
    public LayuiDataGridResult getListByVo(EquipmentVo equipmentVo) {
        return equipmentService.getEquipmentListByVo(equipmentVo);
    }
}
